HAL TimeBase TIM Overview ¶
Introducing HAL TimeBase TIM ¶
- group TimeBase_TIM_Introduction
-
The TIM time base pattern provides an alternative to the default Cortex System Timer (SysTick) for the HAL time base in STM32 microcontrollers.
This is useful in applications where SysTick is reserved for an RTOS, and a hardware timer (TIM) can generate periodic interrupts for the HAL tick.
The TIM timebase implementation is ready-to-use, requires no customization, and integrates seamlessly with the STM32 HAL.
Module and files ¶
The following diagram illustrates the HAL TimeBase TIM module and its associated files.
Component diagram ¶
The following diagram illustrates the software components involved in the HAL TimeBase TIM module. It shows the interactions between the user application, HAL drivers, low-level drivers, and the hardware components.
Configuration table ¶
The following table lists the configuration defines for the HAL TimeBase TIM, specifying their locations, default values, and descriptions:
- group TimeBase_TIM_Configuration_Table
-
Configuration inside the TIM time base ¶
Config defines
Where
Default value
Note
USE_HAL_TIM_MODULE
hal_conf.h
1
HAL TIM module is enabled
USE_HAL_TIM_REGISTER_CALLBACKS
hal_conf.h
0
Enable register callback feature
USE_HAL_TIM_CLK_ENABLE_MODEL
hal_conf.h
HAL_CLK_ENABLE_NO
Enable the gating of the peripheral clock
USE_HAL_CHECK_PARAM
hal_conf.h
0
Enable run-time parameter check
USE_HAL_CHECK_PROCESS_STATE
hal_conf.h
0
Enable atomic access to process state check
USE_ASSERT_DBG_PARAM
PreProcessor env
NA
Enable the parameter assert
USE_ASSERT_DBG_STATE
PreProcessor env
NA
Enable the state assert